package com.ruoyi.system.service;

import com.ruoyi.system.domain.Info;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 新闻Service接口
 * 
 * @author ruoyi
 * @date 2022-12-02
 */
public interface IInfoService 
{
    public boolean addCustom(String CategoryId, String Jianti, String Infotitle, String Infotitle2, String Summary, String Author, String Infocontemt, String Picurl, String Returnurl, Date Addtime,Date Releasetime,
                             long Shifouzhiding, Date Zhidingshijian,int Checkpass, int Ordernum);

    public boolean modifyCustom(String InfoId,String OldCategoryId,String Jianti,String Infotitle,String Infotitle2,String Summary,String Author,String Infocontemt,String Picurl,String Returnurl,Date Addtime,Date Releasetime,
                                long Shifouzhiding,Date Zhidingshijian,int Checkpass,int Ordernum);

    public boolean deleteCustom(String InfoId,String CategoruId);

    public int countZhidingxinwen(String ppCategoryId);

    public int getMaxOrdernum(String ppCategoryId);

    public List<Map<String, Object>> isZhiding(String ppInfoId);
    /**
     * 查询新闻
     * 
     * @param infoid 新闻主键
     * @return 新闻
     */
    public Info selectInfoByInfoid(String infoid);

    List<Map<String, Object>> findByCategoryIdPaging(String ppCategoryId,String ppInfotitle,String deptid,int ppStartIndex,int ppPageSize);

    List<Map<String, Object>> findPassedByCategoryIdAndTitlePaging(String ppCategoryId,int ppStartIndex, int ppPageSize);

    int countPassedByCategoryIdAndTitlePaging(String ppInfotitle);

    int countByCategoryIdPaging(String ppCategoryId,String ppInfotitle,String deptid);

    public List<Map<String, Object>> jiansuoInfo(String ppShijian, String ppFanwei,String ppNeirong,String ppshifouxuanzelanmu,List<String> ppCategoryidlist,String ppQi, String ppZhi,String ppPaixu,int ppStartIndex, int ppPageSize);

    public int countJiansuoInfo(String ppShijian, String ppFanwei,String ppNeirong,String ppshifouxuanzelanmu,List<String> ppCategoryidlist,String ppQi, String ppZhi);

    List<Map<String, Object>> findByCategoryId(String ppCategoryId);

    List<Map<String, Object>> findPassedByCategoryIdPaging(String ppCategoryId,String ppInfotitle,int ppStartIndex, int ppPageSize);

    List<Map<String, Object>> findSYPassedByCategoryIdPaging(String ppCategoryId,int ppStartIndex, int ppPageSize);

    List<Map<String, Object>> findPassedBySJCategoryId(String ppCategoryId);

    int countPassedByCategoryIdPaging(String ppCategoryId,String ppInfotitle);

    Map<String, Object>findCustomOne(String ppInfoId);

    Map<String, Object>findOneInfo(String ppInfoId, String ppCategoryId);

    public List<Map<String, Object>> findPassedByCategoryIdAndDeptidPaging(String ppCategoryId, List<String> ppDeptid, int ppStartIndex,
                                                                           int ppPageSize);
    public int countPassedByCategoryIdAndDeptIdPaging(String ppCategoryId, List<String> ppDeptid);


    /**
     * 查询新闻列表
     * 
     * @param info 新闻
     * @return 新闻集合
     */
    public List<Info> selectInfoList(Info info);

    /**
     * 新增新闻
     * 
     * @param info 新闻
     * @return 结果
     */
    public int insertInfo(Info info);

    /**
     * 修改新闻
     * 
     * @param info 新闻
     * @return 结果
     */
    public int updateInfo(Info info);

    /**
     * 批量删除新闻
     * 
     * @param infoids 需要删除的新闻主键集合
     * @return 结果
     */
    public int deleteInfoByInfoids(String infoids);



    /**
     * 删除新闻信息
     * 
     * @param infoid 新闻主键
     * @return 结果
     */
    public int deleteInfoByInfoid(String infoid);
}
